package cz.proks.easyhelpdesk.gwt;

import com.google.gwt.core.client.GWT;
import com.google.gwt.place.shared.PlaceController;
import com.google.web.bindery.event.shared.EventBus;
import com.google.web.bindery.event.shared.SimpleEventBus;

import cz.proks.easyhelpdesk.gwt.ui.HelpdeskMainView;
import cz.proks.easyhelpdesk.gwt.ui.HelpdeskMainViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.HelpdesksView;
import cz.proks.easyhelpdesk.gwt.ui.HelpdesksViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.NewHelpdeskView;
import cz.proks.easyhelpdesk.gwt.ui.NewHelpdeskViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.NewTicketView;
import cz.proks.easyhelpdesk.gwt.ui.NewTicketViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.SettingsView;
import cz.proks.easyhelpdesk.gwt.ui.SettingsViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.ThreadView;
import cz.proks.easyhelpdesk.gwt.ui.ThreadViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.UserView;
import cz.proks.easyhelpdesk.gwt.ui.UserViewImpl;
import cz.proks.easyhelpdesk.gwt.ui.WelcomeView;
import cz.proks.easyhelpdesk.gwt.ui.WelcomeViewImpl;


public class ClientFactoryImpl implements ClientFactory {
	private final EventBus eventBus = new SimpleEventBus();
	private final PlaceController placeController = new PlaceController(eventBus);
	private final HelpdeskMessages helpdeskMessages = GWT.create(HelpdeskMessages.class);
	private final WelcomeView welcomeView = new WelcomeViewImpl();	
	private final HelpdesksView helpdesksView = new HelpdesksViewImpl();
	private final NewHelpdeskView newHelpdeskView = new NewHelpdeskViewImpl();
	private final HelpdeskMainView helpdeskMainView = new HelpdeskMainViewImpl();
	private final NewTicketView newTicketView = new NewTicketViewImpl();
	private final ThreadView threadView = new ThreadViewImpl();
	private final SettingsView settingsView = new SettingsViewImpl();
	private final UserView userView = new UserViewImpl();
	
	@Override
	public EventBus getEventBus() {
		return eventBus;
	}

	@Override
	public PlaceController getPlaceController() {
		return placeController;
	}
	
	@Override
	public HelpdeskMessages getHelpdeskMessages() {
	    return helpdeskMessages;
	}

	@Override
	public WelcomeView getWelcomeView() {
		return welcomeView;
	}

	@Override
    public HelpdesksView getChooseOrRegisterView() {
        return helpdesksView;
    }

    @Override
    public NewHelpdeskView getCreateHelpdeskView() {
        return newHelpdeskView;
    }

    @Override
    public HelpdeskMainView getHelpdeskMainView() {
        return helpdeskMainView;
    }

    @Override
    public NewTicketView getTicketView() {
        return newTicketView;
    }

    @Override
    public ThreadView getThreadView() {
        return threadView;
    }	            
    
    @Override
    public SettingsView getSettingsView() {
        return settingsView;
    }

    @Override
    public UserView getUserView() {
        return userView;
    }        
}
